<style>.index_form label,input[type=submit]{ width: auto;}
.index_form input[type=text]{ width: 92%;}
.custom .input{margin: 0; float: left;margin-right: 10px;width: 250px;}
.dataTables_length{margin-top: -2px;}</style>
<div id="content-header">
    <h1>Danh sách danh mục</h1>
</div>
<div class="container-fluid">
<div class="row-fluid">
    <div class="span12">    
    <?php //echo $this->element('toolbar');?>
    <?php //echo $this->Form->create('Paginate', array('id' => 'paginate', 'url' => $this->request->here(false), 'type' => 'post', 'inputDefaults' => array('label' => false))); ?>                                            
        <div class="widget-box widget-content-no-padding">
            <!--For manage node normal-->
                <div class="widget-content widget-content-two">
                <table class="table table-bordered data-table table-striped wd-hover-btn">
                    <thead>
                        <tr>
                            <th width="5%">STT     </th>
                            <th> Tên danh mục</th>
                            <th>Thao tác</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $stt=1;
                        ?> 
                        <?php foreach ($index as $data) : ?>                                            
                        <tr>                           
                            <td><?php echo $stt ; $stt++;?> </td>
                            <td><?php echo $data['Index']['name']; ?></td>   
                            <td><a href="/admin/node/node/delete_index/<?php echo $data['Index']['id']; ?>">Xóa</a></td>
                        </tr>                        
                        <?php endforeach?> 
                                            
                    </tbody>                         
                </table>  
                       
            </div>
            
        </div>
        <div class="widget-box widget-content-no-padding" style="border: 1px solid #CDCDCD;">
            <!--For manage node normal-->
                <div class="widget-content widget-content-two">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-th"></i>
                    </span>
                    <h5>Thêm danh mục mới</h5>
                </div>
                <?php echo $this->Form->create('Index',array('name'=>'','url' => $this->request->here(false),'class'=>'form-horizontal index_form'));?>             
                    <div class="label_div clear">
                        <label style="margin-top: 8px; margin-right: 5px;margin-left: 5px;">Tên danh mục</label>
                    </div>
                    <div class=" form-group clear">
                    
                        <div class="col-xs-3 custom" style="margin: 10px;" >
                            <?php echo $this->Form->input('name',array('class'=>'form-control required','placeholder'=>'','label'=>false,'type'=>'text'));?>
                            <input class="btn btn-primary" type="submit" value="Lưu" />
                        </div>
                    </div>     
                    
                <?php echo $this->Form->end();?>     
            </div>
        </div>
    </div>    
</div>
<?php         
//echo $this->Form->hidden('task', array('id' => 'task', 'value' => ''));
//echo $this->Form->end();
?>